package com.fept.msgcore.msgserver.protocol.exception;

/**
 * Created by Srma on 1/13/2017.
 */
public enum ProtocolErrorCodeEnum {

    SUCCESS("SUCCESS", "succcess"),

    INVALID_DATA("INVALID_DATA", "invalid protocol data"),

    SYSTEM_ERROR("SYSTEM_ERROR", "unknown system error"),

    INVALID_TIME("INVALID_TIME", "invalid timestamp"),

    INVALID_KEY("INVALID_KEY", "invalid key"),

    UNSUPPORTED_ALGORITHM("UNSUPPORTED_ALGORITHM", "unsupported algorithm"),

    SIGN_VALIDATION_ERROR("SIGN_VALIDATION_ERROR", "signature validation error"),

    DECRYPTION_ERROR("DECRYPTION_ERROR", "decryption error"),

    INVALID_FRAME_OPTION("INVALID_FRAME_OPTION", "invalid frame option"),

    INVALID_FRAME_BODY("INVALID_FRAME_BODY", "invalid frame body"),

            ;

    private String code;
    private String desc;

    /**
     *
     * @param code
     * @param desc
     */
    ProtocolErrorCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @param code
     *            the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @return the desc
     */
    public String getDesc() {
        return desc;
    }

    /**
     * @param desc
     *            the desc to set
     */
    public void setDesc(String desc) {
        this.desc = desc;
    }

}
